<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>判断整数范围</title>
</head>
<body>
    <script>

        var num = 10.4;

        if(num % 1 != 0){
            console.log(num+'这不是整数');
        }else{
            if(num > 0){
                console.log(num+'大于0');
            }else if(num == 0){
                console.log(num+'等于0')
            }else{
                console.log(num+'小于0');
            }
        }

    </script>
</body>
</html>